package com.Dec_Eleven;

public class Solution1704 {

    public boolean halvesAreAlike(String s) {
        String temp="aeiouAEIOU";
        int n=s.length();
        int count=0;
        for (int i=0,j=n/2;i<n/2&&j<n;i++,j++)
        {
            if (temp.contains(s.charAt(i)+"")){
                count++;
            }
            if (temp.contains(s.charAt(j)+"")){
                count--;
            }
        }
        return count==0;
    }

    public static void main(String[] args) {
        Solution1704 solution1704=new Solution1704();
        System.out.println(solution1704.halvesAreAlike("textbook"));
    }

}
